//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop

#include "RLEmiFat.h"

//---------------------------------------------------------------------------
#pragma package( smart_init )
#pragma link "PHReport"
#pragma link "PHRBand"
#pragma link "PHRLabel"
#pragma resource "*.dfm"
TRLEmiFat1*  RLEmiFat1;

//---------------------------------------------------------------------------
__fastcall TRLEmiFat1::TRLEmiFat1( TComponent*  Owner ) : TForm( Owner )
{
}

//---------------------------------------------------------------------------
void __fastcall TRLEmiFat1::PHReport1NeedData( PHReport*  Sender, bool&  MoreData )
{
  if( Linhas->Count<2 )
   {
    MoreData = false;
    return;
   }
  else
   {
    if(Linhas->Strings[0]=="PHNOVAPAGINA")
     {
      //PHRBand1->ForceNewPage = true;
      PHRLabel1->Caption = Linhas->Strings[1];
      Linhas->Delete( 0 );
      Linhas->Delete( 0 );
     }
    else
     {
      PHRBand1->ForceNewPage = false;     
      PHRLabel1->Caption = Linhas->Strings[0];
      Linhas->Delete( 0 );
     }
   }
}

//---------------------------------------------------------------------------

